﻿using AppService.IService.Basic_information;
using AppService.IService.System_operation;
using AppService.Service.Basic_information;
using Domain.Entity.Basic_information;
using Domain.Entity.System_operation;
using Microsoft.AspNetCore.Mvc;

namespace WebAPI.Controllers.System_operation
{
    [Route("api/[controller]/[action]")]
    [ApiController]
    public class Arrival_meterController : ControllerBase
    {
        private readonly IArrival_meterService Iarrival_meterService;

        public Arrival_meterController(IArrival_meterService iarrival_meterService)
        {
            Iarrival_meterService = iarrival_meterService;
        }

        /// <summary>
        /// 分页查询
        /// </summary>
        /// <param name="currentPage"></param>
        /// <param name="PageSize"></param>
        /// <returns></returns>
        [HttpGet("{currentPage},{PageSize}")]
        public List<Arrival_meter> GetArrival_meters(int currentPage, int PageSize)
        {
            return Iarrival_meterService.GetArrival_meters(currentPage, PageSize);
        }

        [HttpGet]
        public int Count(string? RealityGet_time, string? value2, string? Origin_place, string? Det_place)
        {
            return Iarrival_meterService.Count(RealityGet_time, value2,Origin_place,Det_place);
        }

        [HttpGet("{id}")]
        public Bill_ol GetBillId(int id)
        {
            return Iarrival_meterService.GetBillId(id);
        }
        //订单到站
        [HttpPut("{id}")]
        public bool DDArrival(int id)
        {
            return Iarrival_meterService.DDArrival(id);
        }
        //整车到站
        [HttpPut("{Wb_number}")]
        public bool ZCArrival(string Wb_number)
        {
            return Iarrival_meterService.ZCArrival(Wb_number);
        }

        [HttpGet("{currentPage},{PageSize}")]
        public List<Arrival_meter> Arrival_condition(string? RealityGet_time, string? value2, string? Origin_place, string? Det_place, int currentPage, int PageSize)
        {
            return Iarrival_meterService.Arrival_condition(RealityGet_time, value2,Origin_place,Det_place,currentPage,PageSize);
        }
    }
}
